﻿// Copyright 2009 Mike Geise
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Falcon.Core.Domain.Repositories
{
	using System.Collections.Generic;
	using Falcon.Core.Collections;

	public interface ICountryRepository
	{
		/// <summary>
		/// Gets the <see cref="Country"/> by the specified specification.
		/// </summary>
		/// <param name="specification">The <see cref="CountrySpecification"/>.</param>
		Country GetBy(CountrySpecification specification);

		/// <summary>
		/// Gets the <see cref="Country"/> by id.
		/// </summary>
		/// <param name="id">The id.</param>
		Country GetById(int id);

		/// <summary>
		/// Gets all the countries.
		/// </summary>
		IList<Country> GetAll();

		/// <summary>
		/// Gets all the countries.
		/// </summary>
		/// <param name="specification">The <see cref="CountrySpecification"/>.</param>
		IPagedList<Country, CountrySpecification> GetPaged(CountrySpecification specification);

		/// <summary>
		/// Gets the total count of countries.
		/// </summary>
		/// <returns></returns>
		int Count();

		/// <summary>
		/// Inserts the specified <see cref="Country"/>.
		/// </summary>
		/// <param name="country">The <see cref="Country"/>.</param>
		void Insert(Country country);

		/// <summary>
		/// Updates the specified <see cref="Country"/>
		/// </summary>
		/// <param name="country">The <see cref="Country"/>.</param>
		void Update(Country country);

		/// <summary>
		/// Deletes the specified <see cref="Country"/>.
		/// </summary>
		/// <param name="country">The <see cref="Country"/>.</param>
		void Delete(Country country);
	}
}